package pri.hillchen.springbootstd.sso.config.redis;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;

import java.net.UnknownHostException;

/**
 * @author:hillchen
 * @DESCRIPTION:
 * @Date: Created in 16:22 2017/12/11 0011.
 */
@Configuration
public class RedisConfiguration {

    @Bean
    public StringObjectRedisTemplate stringObjectRedisTemplate(RedisConnectionFactory redisConnectionFactory) throws UnknownHostException {
        StringObjectRedisTemplate template = new StringObjectRedisTemplate();
        template.setConnectionFactory(redisConnectionFactory);
        return template;
    }

}
